package com.lxd.property.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lxd.property.dao.PowerroomMapper;
import com.lxd.property.pojo.Powerroom;
import com.lxd.property.service.PowerroomService;

@Service("powerroomService.do")
@Transactional
public class PowerroomServiceImpl implements PowerroomService {

	@Autowired
	private PowerroomMapper powerroomMapper;

	@Override
	public Map<String, Object> getPowerroomList(Map<String, Object> map) {
		// TODO Auto-generated method stub

		Map<String, Object> resMap = new HashMap<String, Object>();

		List<Powerroom> list = powerroomMapper.getPowerroomList(map);

		Long total = powerroomMapper.getPowerroomListCount(map);

		resMap.put("rows", list);
		resMap.put("total", total);

		return resMap;
	}

	@Override
	public Powerroom getLastPowerroom() {
		// TODO Auto-generated method stub
		return powerroomMapper.getLastPowerroom();
	}

	@Override
	public Integer addPowerroom(Powerroom powerroom) {
		// TODO Auto-generated method stub
		return powerroomMapper.addPowerroom(powerroom);
	}

	@Override
	public Powerroom findPowerroomById(Integer id) {
		// TODO Auto-generated method stub
		return powerroomMapper.findPowerroomById(id);
	}

}
